// seatGenerator.js
function generateSeat(ticketType) {
  const areaMap = {
    VIP票: 'VIP区域',
    A级票: 'A区域',
    B级票: 'B区域',
    C级票: 'C区域',
    D级票: 'D区域'
  };

  if (!areaMap[ticketType]) {
    return '无效的票种类';
  }

  const row = Math.floor(Math.random() * 10) + 1;
  const seat = Math.floor(Math.random() * 20) + 1;

  return `${areaMap[ticketType]} ${row}排 ${seat}号`;
}

export default generateSeat;
